package com.yyp.car.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yyp.car.Idao.IStudentDao;
import com.yyp.car.Iservice.IStudentService;
import com.yyp.car.model.Student;
@Service("studentService")
public class StudentService implements IStudentService{
	@Resource(name="studentDao")
	private IStudentDao studentDao;
	

	@Override
	public Student registerStudent(Student student) {
		return studentDao.add(student);
	}

	@Override
	public void addTestType(int id, String testType) {
		studentDao.updateByTestType(id, testType);
		
	}

	@Override
	public void delTestType(int id) {
		studentDao.delTestType(id);
	}

	@Override
	public String findTestType(int id) {
		return studentDao.findTestType(id);
	}

	@Override
	public Student load(int id) {
		return this.load(id);
	}

	@Override
	public List<Student> listStudent() {
		
		return studentDao.listStudent();
	}

	@Override
	public void updateTestMes(int id,String testplace,String beginTime,String endTime) {
		studentDao.updateTestMes(id, testplace, beginTime, endTime);
	}

	@Override
	public Student findTestMes(int id) { 
		return studentDao.findTestMes(id);
	}

	@Override
	public void cancleTestMes(int sid) {
		studentDao.cancleTestMes(sid);
		
	}

	@Override
	public Student findStudet(int id) {
		return studentDao.findStudet(id);
	}

	@Override
	public void update(Student student) {
		studentDao.update(student);
	}
	

}
